<!--
 * @Description: 
 * @Author: xiongkuobiao
 * @Date: 2023-04-13 00:56:46
 * @LastEditors: xiongkuobiao
 * @LastEditTime: 2023-04-13 01:00:43
-->
<!--
 * @Description: 
 * @Author: xiongkuobiao
 * @Date: 2023-02-17 16:40:03
 * @LastEditors: xiongkuobiao
 * @LastEditTime: 2023-02-17 17:01:31
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    // function Create(proto1) {
    //   function F() {}
    //   F.prototype = proto1;
    //   return new F();
    // }
    // function demo() {
    //   this.name = "111";
    // }
    // let obj = Create(demo.prototype);
    // console.log(obj);

    // function instanceof1(left, right) {
    //   left = left.__proto__;
    //   while (true) {
    //     if (left == right.prototype) {
    //       return true;
    //     }
    //     left = left.__proto__;
    //     if (left == null) {
    //       return false;
    //     }
    //   }
    // }

    // let obj = {};

    // console.log(instanceof1([], Object));

    // function new1(fn, ...args) {
    //   let newObj = Object.create(fn.prototype);
    //   let result = fn.apply(newObj, args);
    //   return typeof result == "object" ? result : newObj;
    // }
    // function demo(...args) {
    //   this.name = 111;
    //   console.log(args);
    // }

    // let obj = new1(demo, 1, 2, 3);
    // console.log(obj);
  </script>
</html>
